Skip to content

feat: hot reload eszip bundle when function source changes #3710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 18, 2025

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Jun 12, 2025

What kind of change does this PR introduce?

Bug fix

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge requested a review from a team as a code owner June 12, 2025 07:30
@sweatybridge sweatybridge force-pushed the watch-serve branch 2 times, most recently from c226f2b to cf62e9a Compare June 13, 2025 08:25
avallete and others added 4 commits June 15, 2025 12:34
* chore: add watcher tests and main.ts

* chore: add serve tests

* chore: fix lints

* chore: remove sleep in tests

* chore: simulate fs event when possible

* chore: avoid flaky tests

* chore: undo debounce test

---------

Co-authored-by: Qiao Han <[email protected]>
@sweatybridge sweatybridge changed the title fix: file watcher skeleton for serving functions feat: implement file watcher for serving functions Jun 16, 2025
Copy link
Member

@avallete avallete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested on the branch:

  1. Change config.toml reload serve
  2. Update transient deps reload serve
  3. Adding a new function / removing new function update serve
  4. Updating funciton index.ts reload serve

if watcher := runtimeOption.fileWatcher; watcher != nil {
var watchPaths []string
for _, b := range binds {
if spec, err := loader.ParseVolume(b); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise

Nice re-use of docker api.

@sweatybridge sweatybridge changed the title feat: implement file watcher for serving functions feat: hot reload eszip bundle when function source changes Jun 18, 2025
@sweatybridge sweatybridge merged commit 1773931 into develop Jun 18, 2025
14 checks passed
@sweatybridge sweatybridge deleted the watch-serve branch June 18, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants